﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Metriks.Parsiranje.Klase
{
    public class varDecl :LOC, Renameable
    {
        public Varijabla varijabla;

        public varDecl(String[] parametri)
        {
            varijabla = new Varijabla(parametri[0], parametri[1]);
        }

        public override string ispiši()
        {
            return varijabla.ispiši() + ";";
        }
        public void renameVariable(string oldname, string newname)
        {
            if (varijabla.Naziv == oldname) {
                varijabla.Naziv = newname;
            }
        }
    }
}
